<?php $TITLE='Examples'; include 'head.php'; ?>

<?php

function li($name) {
  n('<li><a href="#' . $name . '">' . $name . '</a></li>');
}
function h($name,$class,$description) {
  n('<a name="' . $name . '"></a>');
  n('<h2 class="ex">' . $name . '</h2>');
  n('<table border="0" cellpadding="1" cellspacing="1">');
  n('  <tr class="row">');
  n('    <td class="l">');
  n('      <p>');
  n('        ' . $description);
  n('      </p>');
  n('      <p>');
  n('        Vitals:');
  n('        <br/>');
  n('        <blockquote>');
  n('          <table class="t" border="0" cellspacing="1" cellpadding="1">');
  n('            <tr>');
  n('              <td class="r">URL</td>');
  n('              <td><a href="/iwebapp/' . $name . '.php" target="_">');
  n('                  http://jeffpalm.com/iwebapp/' . $name . '.php');
  n('                </a>');
  n('              </td>');
  n('            </tr>');
  n('            <tr>');
  n('              <td class="r">Make command</td>');
  n('              <td><code>make ' . $name . '</code>');
  n('            </tr>');
  n('            <tr>');
  n('              <td class="r">Main class</td>');
  n('              <td><code>' . $class . '</code></td>');
  n('            </tr>');
  n('          </table>');
  n('        </blockquote>');
  n('        <br/>[<em><a href="#top">top</a></em>]');
  n('      </p>');
  n('    </td>');
  n('    <td class="r"><a href="images/' . $class . 'Example.png" border="0">');
  n('        <img src="images/' . $class . 'Example-small.png" border="0" >');
  n('      </a>');
  n('    </td>');
  n('  </tr>');
  n('</table>');

}
?>

<p>

  The following are a few examples of applications in this package.
  For each we give a brief description, <code>make</code> command, and
  URL.  In all these example, you must first run the <code>make</code>
  command (or execute) the main class, and note the IP address of the
  local machine, such as the dialog to the right.  Then when you
  access the URL on an IPhone (or other phone or web browser), you
  must enter this IP address in the <em>host</em> field of that page.

  <table border="0" cellpadding="1" cellspacing="1">
  <tr>
  <td>
  <ul>
    <?php
       $lis = array(
       'google',
       'remote',
       'main',
       'itunes');
       foreach ($lis as $li) li($li);
       ?>
  </ul>
</td>
  <td>
<a href="images/ip.png"><img src="images/ip-small.png" border="0"></a>
</td>
</tr>
</table>
         
</p>

<?php 
   h('google',
   'Google',
   'Provides a remote control for launching google applications, such as mail, calendar, etc... using icon buttons on your laptop or other local machine.  Clicking the various buttons will open various google application on your local machine.  For example, clicking the <img src="/iwebapp/icons/Mail.png" width="15px"> icon will open <a href="http://mail.google.com">http://mail.google.com</a> in a browser, clicking the <img src="/iwebapp/icons/YouTube.png" width="15px"> icon will open <a href="http://youtube.com">http://youtube.com</a>'
   ); 

h('remote','Remote',
  'This provides a customizable interface to control actions on a local machine.  The user can pass file names on the command line to the main class and/or havea file named <code>~/.iwebapp</code> containing lines of the form <blockquote><em>Name</em> \'<code>|</code>\' <em>Command</em></blockquote>Where <em>Name</em> is the name of the command, and <em>Command</em> is the actual command to execute.  This screen shot to the right is taken from the example <code>etc/remote.ir</code> in the source code distribution and is the following '
  . '<pre>'
  . 'Mail|open http://mail.google.com' . "\n" 
  . 'Browse|open http://google.com'    . "\n" 
  . 'Calendar|open http://calendar.google.com' . "\n"
  . '</pre>' 
  . 'The user should input the IP address of the local server and then go.');

h('main','ITunesMain',
  'This is a normal iTunes interface, and allows one to navigate via artist, album, etc.  The user should input the IP address of the local server and then go.');

h('itunes','ITunes',
'This is another iTunes interface, and gives the user a single-page view of her iTunes library.  The user should input the IP address of the local server and then go.');

?>



<?php include 'foot.php'; ?>
